package demoMod.invincibleOne.relics;

import com.badlogic.gdx.graphics.Texture;
import com.megacrit.cardcrawl.actions.common.ApplyPowerAction;
import com.megacrit.cardcrawl.actions.common.RelicAboveCreatureAction;
import com.megacrit.cardcrawl.characters.AbstractPlayer;
import com.megacrit.cardcrawl.core.CardCrawlGame;
import com.megacrit.cardcrawl.dungeons.AbstractDungeon;
import com.megacrit.cardcrawl.powers.StrengthPower;
import demoMod.invincibleOne.InvincibleOneMod;
import demoMod.invincibleOne.interfaces.IOnCompleteBingo;

public class GoldenLegend extends AbstractInvincibleRelic implements IOnCompleteBingo {
    public static final String ID = InvincibleOneMod.makeID("GoldenLegend");
    public static final Texture IMG = new Texture(InvincibleOneMod.getResourcePath("relics/GoldenLegend.png"));
    public static final Texture OUTLINE_IMG = new Texture(InvincibleOneMod.getResourcePath("relics/GoldenLegend.png"));

    public GoldenLegend() {
        super(ID, IMG, OUTLINE_IMG, RelicTier.SPECIAL, LandingSound.FLAT);
    }

    @Override
    public String getUpdatedDescription() {
        return DESCRIPTIONS[0];
    }

    @Override
    public void atBattleStart() {
        this.flash();
        AbstractPlayer p = AbstractDungeon.player;
        addToBot(new RelicAboveCreatureAction(p, this));
                addToBot(new ApplyPowerAction(p, p, new StrengthPower(p, 2)));
    }

    @Override
    public void onCompleteBingo() {
        flash();
        CardCrawlGame.sound.play("GOLD_GAIN");
        AbstractDungeon.player.gainGold(15);
    }
}
